home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / VR_Shield.as < prev    next >
Text File  |  2006-11-29  |  595b  |  30 lines

  1. class VR_Shield extends GameCollectable
  2. {
  3.    var assetID = "Shield";
  4.    var value = 30;
  5.    var editor_isItem = true;
  6.    var editor_name = "VRShield";
  7.    function VR_Shield()
  8.    {
  9.       super();
  10.    }
  11.    function onAddToWorld()
  12.    {
  13.       if(!_global.VR_ON_SHIELD)
  14.       {
  15.          this.world.removeObject(this);
  16.          return undefined;
  17.       }
  18.    }
  19.    function setCollected(obj)
  20.    {
  21.       if(this.collected)
  22.       {
  23.          return undefined;
  24.       }
  25.       GameSound.playSound("vr");
  26.       obj.shiftShield(this.value);
  27.       this.world.removeObject(this);
  28.    }
  29. }
  30.